Repository navigation
feat(scheduled-history): Gap 3 watchdog over OpenChamber run history (#2174) - #11158
Conversation
watchdog.py check consumes the Gap 1 collect.py store and flags missing_run, stale, and failed_latest per scheduled task, with the expected-window source (declared --windows override or observed schedule) stated in each alert. JSON on stdout + exit 1 on alerts is the alert path for the fleet-watchdog cron. test_watchdog.py: 13 checks; test_collect.py still 19/19.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 45 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Gap 3 of #2174: watchdog coverage over the Gap 1 run history.
What landed (
pm-stack/scheduled-history/)watchdog.py—watchdog.py checkreads the collect.py store (~/.local/state/openchamber-scheduled-history/history.json) and flags, per scheduled task:missing_run— no run scheduled within the task's expected cadence window;stale— newest run older than the stale threshold (default 2× the window,--stale-multiplier) with nothing in flight;failed_latest— most recent terminal outcome is an error class (error/failed/failure/timeout/timed_out).--windows(JSON: task id → seconds) when present, otherwise the observed schedule — the minimum interval between consecutivescheduled_forinstants in the task's own history (window_source: observed-schedule). A task whose history is younger than one window is in its first window and cannot alert for missing/stale; disabled tasks are skipped; an in-flight (non-terminal) latest run suppresses missing/stale.scheduled-history-watchdog/v1) on stdout — task, condition, and evidence timestamps per alert — with exit 1 when any alert fires and 0 when healthy. That document is the input the fleet-watchdog cron consumes; the script sends nothing itself and changes no schedule.test_watchdog.py— 13 checks in test_collect.py's plain-script style: healthy, missing, stale, failed-latest, first-window grace, declared-window override (both directions), disabled skip, in-flight suppression. All pass;test_collect.pystill 19/19.Live smoke against the real store at build time: 37 tasks checked, 29 alerts (mostly
stale— the collector's store had not ticked for ~6h at that moment, which is exactly the silence this check exists to surface).Per-gap status after this PR: Gap 1 closed (openchamber PR #2082 + code PR #8437); Gap 2 (token accounting) is #2072-owned; Gap 3 is this PR; Gaps 4 (server residency), 5 (shared-state locality), and 6 (identity binding) have no packets yet.
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.